<?php

/**
 * Source code under Creative Commons License 
 * (see LICENSE FILE)
 *
 * Copyright (c) 2013 Maelstrom.
 * All rights reserved.
 *
 *
 * @author      Maelstrom <devcreamframework@gmail.com>
 * @copyright   2012 Maelstrom.
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @link        https://github.com/maelstromkd/cream-dev.git
 * @version     1.2
 */


if(file_exists(__BACKEND__ . 'contents' . DIRECTORY_SEPARATOR . $_APP->page . '.html')){
    readfile(__BACKEND__ . 'contents' . DIRECTORY_SEPARATOR . $_APP->page . '.html');
}elseif(file_exists(__BACKEND__ . 'contents' . DIRECTORY_SEPARATOR . $_APP->page . '.php')){
    include(__BACKEND__ . 'contents' . DIRECTORY_SEPARATOR . $_APP->page . '.php');
}elseif(file_exists(__BACKEND__ . 'contents' . DIRECTORY_SEPARATOR . $_APP->page . '.js')){
    include(__BACKEND__ . 'contents' . DIRECTORY_SEPARATOR . $_APP->page . '.js');
}else{
    include(__ERRORS__ . '404.html.php');
}
